﻿using SelfManagement.Database.POCO;
using Ninject;
using SelfManagement.IServices;
using SelfManagement.Utility.Helper;
using SelfManagement.Mvc.Result;
using SelfManagement.Mvc.Helper;
using MvcPaging;
using SelfManagement.Web.Infrastructure;
using System.Web.Mvc;
using SelfManagement.Web.Models.ViewModels.ArticleModels;
using SelfManagement.Utility.Extensions;
using System.Linq;
using SelfManagement.Mvc.Models;
using System.Collections.Generic;

namespace SelfManagement.Web.Controllers
{
    public class SeniorAdminController : CommonBaseController
    {
        [Inject]
        public ISeniorService SeniorService { get; set; }
        // GET: SeniorAdmin
        public ActionResult Index()
        {
            ViewBag.Seniors = SeniorService.Query(t => true).ToList();
            return View();
        }

        // GET: SeniorAdmin/Details/5
        public ActionResult Details(int id)
        {
            return View();
        }

        // GET: SeniorAdmin/Create
        public ActionResult Create()
        {
            return View();
        }

        // POST: SeniorAdmin/Create
        [HttpPost]
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                // TODO: Add insert logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        // GET: SeniorAdmin/Edit/5
        public ActionResult Edit(int id)
        {
            return View();
        }

        // POST: SeniorAdmin/Edit/5
        [HttpPost]
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add update logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        // GET: SeniorAdmin/Delete/5
        public ActionResult Delete(int id)
        {
            return View();
        }

        // POST: SeniorAdmin/Delete/5
        [HttpPost]
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
    }
}
